import { Hono } from 'hono'
import { UserController } from '../controllers/user.controller.js'
import { jwtMiddleware } from '../middlewares/auth.middleware.js'

const userRouter = new Hono()

// 公开路由
userRouter.post('/register', UserController.register)
userRouter.post('/login', UserController.login)

// 受保护路由
userRouter.use('/protected/*', jwtMiddleware)
userRouter.get('/protected/profile', UserController.getProfile)

export default userRouter 